<?php

	$ColsNumber = 2;
	$title = fill( getTerm('albums', 'user_albums') , $albumUser['username'] );
	pushNavigationItem( getTerm('albums', 'albums') , formatUrl('/albums/') );
	pushNavigationItem( $albumUser['username'] , formatUrl('/albums/'. $albumUser['username']) );
	printHeader($title, $title, 'albums');
	
	$editPerm = $albumUser['id']==$currentUser['id'];

?>

	<div id="formBlock" style="display:none;"></div>

	<script src="/Javascript/lightbox.js"></script>
	<script src="/Javascript/albumsManager.js"></script>
	<script>
	
		currentUserId = <?= $albumUser['id'] ?>;
		currentAlbumId = false;
		currentPhotoId = false;
	
	</script>
	
	<?php if ($hasWritePermission) { ?>

	<div class="controls">
	
		<ul>
			<li><a href="#" onClick="showDynamicForm('createAlbumForm');return false;"><?= getTerm('albums', 'create_an_album') ?></a></li>
		</ul>
		
	</div>
	
	<div>&nbsp;</div>
	
	<?php } ?>

	<div id="albumList">
	
	<?php include('UserAlbumsView.php') ?>
	
	</div>
	
	<?php printExtra() ?>
	
	<div id="searchBox">
	
		<h3><?= getTerm('albums', 'search_photos') ?></h3>
		
		<form action="<?= formatUrl('/albums/search.do') ?>" method="get">
		
			<input type="text" name="w" id="keywords" />
			
			<input type="hidden" name="p" value="1" />
			
			<input type="submit" value="<?= getTerm('albums', 'search') ?>" />
		
		</form>
		
	</div>
	
	<div id="about-album">
	
		<h3><?= fill( getTerm('albums', 'about_album') , $albumUser['username'] ) ?></h3>
		
		<p><?= $albumUser['description'] ?></p>
	
	</div>
	
	<div id="otherPhotosOverview" class="flat-form">
	
		<h3><?= getTerm('albums', 'latest') ?></h3>
		
		<ul>
		
		<?php foreach ( $latestPhotos as $photo ) { ?>
			
			<li id="photo-<?= $photo['id'] ?>">
				<a href="<?= $photo['username']."/".$photo['albumPath']."/".$photo['path'] .'.html' ?>">
					<img src="/Thumbs/<?= $photo['id'] ?>-square.jpg" width="100" alt="<?= $photo['name'] ?>" title="<?= $photo['name'] ?>" />
				</a>
			</li>
			
		<?php } ?>
		
		</ul>
		
		<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
	
	</div>
	
<!-- 	<script type="text/javascript"><!--
google_ad_client = "pub-7990690236722638";
google_ad_width = 250;
google_ad_height = 250;
google_ad_format = "250x250_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_color_border = "FF6600";
google_color_bg = "FFC299";
google_color_link = "0000FF";
google_color_text = "000000";
google_color_url = "008000";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
 -->
<?php

	printFooter();

?>